var joinDAO = require('../models/joinDAO')
var joincontroller = {
    insertJoin:function(req,res){
        var joinID = req.body.joinID
        var joinusername = req.body.joinusername
        var joinaddress = req.body.joinaddress
        var jointelephone = req.body.jointelephone
        var joinarea = req.body.joinarea
        var uesrid = req.body.uesrid
        joinDAO.insertJoin({joinID:joinID,joinusername:joinusername,joinaddress:joinaddress,jointelephone:jointelephone,joinarea:joinarea,uesrid:uesrid},function(err,results){
            if(err){
                console.log(err)
                res.json({code:500,msg:'数据库出错，加入失败'})
            }else{
                res.json({code:200,data:results,msg:'加入成功'})
            }
        })
    }
}
module.exports = joincontroller